-- GENERATED SPELL FOR [Nazgrel] --


function spell0_3230(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(16044,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3230', 687, 1)
end

function spell1_3230(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3230', 5252, 1)
end

function spell2_3230(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(15588,pUnit)
pUnit:RegisterEvent('Sorts_3230', 10326, 1)
end

function spell3_3230(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_3230', 565, 1)
end

function spell4_3230(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_3230', 2000, 1)
end

function Sorts_3230(pUnit, Event)
local choix_sorts_3230 = math.random(0, 4)
if choix_sorts_3230 == 0 then
pUnit:RegisterEvent('spell0_3230', 1, 1)
end
if choix_sorts_3230 == 1 then
pUnit:RegisterEvent('spell1_3230', 1, 1)
end
if choix_sorts_3230 == 2 then
pUnit:RegisterEvent('spell2_3230', 1, 1)
end
if choix_sorts_3230 == 3 then
pUnit:RegisterEvent('spell3_3230', 1, 1)
end
if choix_sorts_3230 == 4 then
pUnit:RegisterEvent('spell4_3230', 1, 1)
end
end

function mob3230_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3230', math.random(1500, 3000), 1)
end

function mob3230_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3230_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3230_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3230, 1, 'mob3230_Action')
RegisterUnitEvent(3230, 2, 'mob3230_Leave')
RegisterUnitEvent(3230, 3, 'mob3230_Kill')
RegisterUnitEvent(3230, 4, 'mob3230_Die')
